package com.fin.quant.domain.service.impl;

import com.fin.quant.domain.service.DividendRpcDomainService;
import com.fin.quant.instra.rpc.DividendRpcClientService;
import com.fin.quant.rpc.proto.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class DividendRpcDomainServiceImpl implements DividendRpcDomainService {

    @Autowired
    private DividendRpcClientService dividendRpcClientService;

    public GetDividendInfoResponse getDividendInfo(GetDividendInfoRequest request){
        return dividendRpcClientService.getDividendInfo(request);
    }

    /**
     * <pre>
     *获取实时资产价格
     * </pre>
     */
    public GetCurrentPriceResponse getCurrentPrice(GetCurrentPriceRequest request) {
        return dividendRpcClientService.getCurrentPrice(request);
    }

    /**
     * <pre>
     *获取历史资产价格
     * </pre>
     */
    public GetHistoryPriceResponse getHistoryPrice(GetHistoryPriceRequest request) {
        return dividendRpcClientService.getHistoryPrice(request);
    }
}
